﻿@model IQueryable<YTCMS.Domain.Entities.guide>
@using YTCMS.Core;
<table id="sample-table-1" class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th>标题</th>
            <th>评价用户</th>
            <th>评价时间</th>
            <th>分类</th>
            <th>是否推荐</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @{
            if (Model.Any())
            {
                foreach (var item in Model)
                {
                    <tr>
                        <td>@item.Title</td>
                        <td>@item.User</td>
                        <td>@item.PushTime</td>
                        <td>@item.category.ExtendFile("Name")</td>
                        <td>@item.IsPush.ToString().Replace("1", "推荐").Replace("0", "未推荐")</td>
                        <td>
                            <a class="green" href="/Guide/edit?id=@item.Id" title="修改">
                                修改
                            </a>
                            <a class="btn btn-xs btn-danger" href="javascript:void(0)" onclick="WZTDelete('/Guide/Delete', {id:@item.Id})">
                                <i class="icon-trash bigger-120"></i>删除
                            </a>
                        </td>
                    </tr>
                }
            }

        }
    </tbody>
</table>
@Html.AjaxPager((int)ViewBag.PageSize, (int)ViewBag.TotalCount)
